import { buildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  // 获取用户信息
  getOrderList: {
    url: '/api/v1/personal/order',
    method: 'get'
  },
  // 获取下拉列表数据
  getStatu: {
    url: '/admin/base/codes/data',
    method: 'get'
  },
  // 删除
  onDelete: {
    url: '/admin/order/delete',
    method: 'get'
  },
  // 订单详情
  getOrderDetail: {
    url: '/api/v1/personal/my_order',
    method: 'get',
    type: 'restful'
  },
  // 提交
  confirmSubmit: {
    url: '/assemble_pay/pay',
    method: 'post'
  },
  // 是否支付成功
  isSuccessOrFail: {
    url: '/admin/order/detail',
    method: 'get'
  }
}

export default buildService(settings)
